<%@ page language="java" import="java.util.*, com.zjut.an.news.manager.*, com.zjut.an.news.dao.*, com.zjut.an.webclass.manager.*, com.zjut.an.webclass.dao.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*,com.zjut.an.util.page.*,com.zjut.an.util.module.*,com.zjut.an.adplace.manager.*, com.zjut.an.ad.manager.*,com.zjut.an.adplace.dao.*, com.zjut.an.ad.dao.*" pageEncoding="utf-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
    <script src="css/tailwindcss.css"></script>
    <style>
        .content-area h2 { font-size: 1.5rem; font-weight: bold; margin: 1.5rem 0 1rem 0; }
        .content-area h3 { font-size: 1.25rem; font-weight: bold; margin: 1.25rem 0 0.75rem 0; }
        .content-area p { margin-bottom: 1rem; }
        .content-area ul, .content-area ol { margin: 1rem 0; padding-left: 2rem; }
        .content-area li { margin-bottom: 0.5rem; }
        .welbtn{width:300px;height:50px; background:#90bd18; font-size:18px;font-weight:bold;color:#fff; cursor:pointer;}
        .welbtndisable{width:300px;height:35px; background:#ccc; font-size:14px;font-weight:bold;color:#fff; cursor:pointer;}
    </style>
    <script type="text/javascript" src="../plugins/assets/plugins/jquery-3.5.1.min.js"></script>
    <script type="text/javascript">
      var leftSecond=10;
      var intervalId;
      $(function(){
        $("#check").attr("disabled",true);
        $("#btnReg").attr("disabled",true);
        intervalId=setInterval("countDown()",1000);
      });

      function countDown(){
        if(leftSecond<=0){
            $("#check").attr("disabled",false);
            clearInterval(intervalId);
            return;
        }
        leftSecond--;        
        $("#btnReg").val("请仔细阅读承诺书(还剩"+leftSecond+"秒)");
      }

      function check(){
    	  var check = document.getElementById('check');
    	  if(check.checked){
    	     //document.getElementById('btnReg').removeAttribute('disabled');
    	     $("#btnReg").attr("class", "welbtn"); 
             $("#btnReg").val("开始考生身份认证");
             $("#btnReg").attr("disabled",false);
    	  }else{
    		 $("#btnReg").attr("class", "welbtndisable"); 
             $("#btnReg").val("请仔细阅读承诺书");
             $("#btnReg").attr("disabled",true);
    	  }
      }
    </script>
</head>
<%
HTMLCreat html = (HTMLCreat) SpringContextUtil.getBean("HTMLCreat");
AnNewsManager manager = (AnNewsManager) SpringContextUtil.getBean("AnNewsManager");

AnNews news = new AnNews();
news.setTitle("报名承诺书");
List list = manager.getDataByInstance(1,1,null,null,news).getObjects();
if(list.size()<1) {
	out.print("<script>window.location='zs_reg.jsp';</script>");
	out.close();
    return;
} else {
	news = (AnNews)list.get(0);
 %>
<body class="bg-gray-50 min-h-screen">
    <div class="max-w-6xl mx-auto px-4 py-8">
        <div class="formbody">
            <div class="rightinfo">
                <h1 class="text-3xl font-bold text-gray-900 mb-6 leading-tight text-center">
                    <%=news.getTitle() %>
                </h1>
                <!--单页面-->
                <div id="news1">
                <br/>
                        <div class="news1content"><%=news.getNeContent() %></div>
                </div>
            </div>
            是否同意承诺：
        <input id="check" type="checkbox" onclick="check()" />
        <label for="check">同意</label>
            <input type="button" id="btnReg" value="仔细阅读流程(还剩10秒)" onclick="javascrtpt:window.location.href='zs_reg.jsp'" class="welbtndisable">
        </div>
    </div>
</body>
<%} %>

</html>
